import java.util.Arrays;
import java.util.Objects;
import java.util.PriorityQueue;
import java.util.Queue;

public class Leet215 {
    public static void main(String[] args) {
        Leet215 l = new Leet215();
        System.out.println(l.findKthLargest(new int[]{3,2,1,5,6,4},2));
    }
    public int findKthLargest(int[] nums, int k) {
        QuickSort quickSort = new QuickSort();
        quickSort.quickSort(nums,0,nums.length);
        return nums[nums.length-k];
    }
}
